﻿using Abp.AutoMapper;
using System.ComponentModel.DataAnnotations;

namespace Sunlit.House.Articles.Dto
{
    [AutoMapTo(typeof(NewsCategory))]
    public class CreateNewsCategoryInput
    {
        /// <summary>
        /// 类别名称长度
        /// </summary>
        public const int MaxNameLength = 256;

        /// <summary>
        /// 类别名称
        /// </summary>
        [Required(ErrorMessage = "请输入类别名称")]
        [StringLength(MaxNameLength, ErrorMessage = "类别名称的最大长度为{1}个字符")]
        public string Name { get; set; }
        /// <summary>
        /// 图片地址
        /// </summary>
        public string ImageUrl { get; set; }
        /// <summary>
        /// 首页显示
        /// </summary>
        public bool ShowOnHome { get; set; }
        /// <summary>
        /// 主菜单显示
        /// </summary>
        public bool ShowInMainMenu { get; set; }
        /// <summary>
        /// 排序
        /// </summary>
        public int DisplayOrder { get; set; }
        /// <summary>
        /// 父类ID
        /// </summary>
        public int? ParentId { get; set; }
        /// <summary>
        /// 层级
        /// </summary>
        public int Layer { get; set; }
    }
}
